package cn.lingyueblog.roomManager.service.impl;

import cn.lingyueblog.common.utils.PageUtils;
import cn.lingyueblog.common.utils.Query;
import cn.lingyueblog.roomManager.dao.RoomsDao;
import cn.lingyueblog.roomManager.entity.RoomsEntity;
import cn.lingyueblog.roomManager.service.RoomsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("roomsService")
public class RoomsServiceImpl extends ServiceImpl<RoomsDao, RoomsEntity> implements RoomsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<RoomsEntity> page = this.page(
                new Query<RoomsEntity>().getPage(params),
                new QueryWrapper<RoomsEntity>()
        );

        return new PageUtils(page);
    }

}